package cn.lh;

import feign.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
// 表名此服务是Eure客户端，开启Eureka客户端功能，不加此注解默认也开启客户端功能
@EnableDiscoveryClient
@EnableFeignClients // 此注解会在启动时扫描当前类同级以及以下所有Feign接口，进行动态代理创建实现类
public class PayApp {
    public static void main(String[] args) {
        SpringApplication.run(PayApp.class, args);
    }
    @Bean
    Logger.Level feignLoggerLevel() {
        return Logger.Level.FULL;	//打印Feign的所有日志
    }
}